﻿@{ 
    Layout = null;
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8" />
    <meta name="renderer" content="blink" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <title>@RTW.Web.Comm.GlobalParams.GetNodes("Title") - 登录</title>
    <link href="~/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" />
    <link href="~/css/animate.min.css" rel="stylesheet" />
    <link href="~/css/style.min.css" rel="stylesheet" />
    <link href="~/css/login.min.css" rel="stylesheet" />
    <script src="~/js/jquery-1.12.4.min.js"></script>
    <script src="~/js/plugins/layer/layer.min.js"></script>
    <link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet" />
    <script>
                @*$(function () {
            $("#ddlDepartment").empty();
                $.getJSON("@Url.Action("GetDDL_List", "Login")",
                    function (data) { 
                    $.each(data, function (i, item) {
                    $("<option></option>").val(item["value"]).text(item["text"]).appendTo($("#ddlDepartment"));
                    })
                });
        });*@
    </script>
    <script src="~/js/store.js"></script>
    <script src="~/js/zuiCode.js"></script>
    <style type="text/css">
        /*div.layui-layer { color: #000; }
        #ulDownLoad li { height: 25px; line-height: 25px; }
        #ulDownLoad li span { color: #ff006e; }
        #ulDownLoad li a { color: #fff; }
        #ulDownLoad li a:hover { color: blue; }*/

        .slideshow { position: absolute; width: 100vw; height: 100vh; overflow: hidden; top: 0px; }

        .slideshow-image { position: absolute; width: 100%; height: 100%; background: no-repeat 50% 50%; background-size: cover; -webkit-animation-name: kenburns; animation-name: kenburns; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-duration: 32s; animation-duration: 32s; opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
        .slideshow-image:nth-child(1) { -webkit-animation-name: kenburns-1; animation-name: kenburns-1; z-index: -1; }
        .slideshow-image:nth-child(2) { -webkit-animation-name: kenburns-2; animation-name: kenburns-2; z-index: -2; }
        .slideshow-image:nth-child(3) { -webkit-animation-name: kenburns-3; animation-name: kenburns-3; z-index: -3; }
        .slideshow-image:nth-child(4) { -webkit-animation-name: kenburns-4; animation-name: kenburns-4; z-index: -4; }

        @@-webkit-keyframes kenburns-1 {
            0% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            1.5625% { opacity: 1; }
            23.4375% { opacity: 1; }
            26.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
            98.4375% { opacity: 0; -webkit-transform: scale(1.21176); transform: scale(1.21176); }
            100% { opacity: 1; }
        }

        @@keyframes kenburns-1 {
            0% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            1.5625% { opacity: 1; }
            23.4375% { opacity: 1; }
            26.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
            98.4375% { opacity: 0; -webkit-transform: scale(1.21176); transform: scale(1.21176); }
            100% { opacity: 1; }
        }

        @@-webkit-keyframes kenburns-2 {
            23.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            26.5625% { opacity: 1; }
            48.4375% { opacity: 1; }
            51.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
        }

        @@keyframes kenburns-2 {
            23.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            26.5625% { opacity: 1; }
            48.4375% { opacity: 1; }
            51.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
        }

        @@-webkit-keyframes kenburns-3 {
            48.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            51.5625% { opacity: 1; }
            73.4375% { opacity: 1; }
            76.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
        }

        @@keyframes kenburns-3 {
            48.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            51.5625% { opacity: 1; }
            73.4375% { opacity: 1; }
            76.5625% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
            100% { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
        }

        @@-webkit-keyframes kenburns-4 {
            73.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            76.5625% { opacity: 1; }
            98.4375% { opacity: 1; }
            100% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
        }

        @@keyframes kenburns-4 {
            73.4375% { opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); }
            76.5625% { opacity: 1; }
            98.4375% { opacity: 1; }
            100% { opacity: 0; -webkit-transform: scale(1); transform: scale(1); }
        }
    </style>
    <script type="text/javascript">
        if (window.top !== window.self) { window.top.location = window.location };

        //function test() {
        //    if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
        //        $("#d1").hide();
        //        $("#d2").show();
        //    }
        //}

        $(function () {
            var isIE6 = isIE() && !window.XMLHttpRequest;
            if (isIE() && isIE6 == false) {
                var htmlStr = "<div style=\"position:fixed;top:0px;left:0px;height:100%;width:100%;background-color:#3e3e3e;opacity:0.4;z-index:99998;\"></div>";
                htmlStr += "<div style=\"position:fixed;top:0px;left:0px;background-color:#EA644A;padding-top:10px;padding-bottom:10px;width:100%;color:#eee;text-align:center;font-size:15px;z-index:99999;\"><i class=\"icon icon-hand-right\"></i>&nbsp;您使用的浏览器不符合软件的浏览要求，请安装&nbsp;<a href=\"/download/360cse_8.7.0.306.exe\">360极速浏览器</a>&nbsp;或者将浏览器模式切换<a href=\"javascript:;\">极速模式</a>，来获得最佳的使用体验！</div>";
                //$("body").after(htmlStr);
            }
            if (isIE6) {
                alert("您的浏览器没有切换成极速模式或者版本太低了，请切换成极速模式或者使用最新的浏览器来获得更好的体验!");
                location.href = "/download/360cse_8.7.0.306.exe";
            }

            if (store.get("LoginDMID") != undefined) {
                $("#ddlDepartment").val(store.get("LoginDMID"));
            }
            $("#ddlDepartment").change(function () {
                store.set("LoginDMID", $(this).val());
            })
        })

        function Login() {
            var _UserAccount = $.trim($("#txtUserAccount").val());
            var _UserPwd = $.trim($("#txtUserPwd").val());
            var _DMID = $("#ddlDepartment").val();
            $.ajax({
                type: "post",
                url: "Login/DoLogin",
                dataType: "json",
                async: false,
                data: { type: "login", UserAccount: _UserAccount, UserPwd: _UserPwd, DMID: _DMID },
                success: function (msg) {
                    if (msg.result == "1") {
                        showTip("尊敬的 " + msg.UserName + " ，欢迎您!", 6, 3);
                    }
                    else if (msg.result == "0") {
                        showTip(msg.errMsg, 7, 0);
                    }
                    else {
                        showTip("登录失败，请检查账号密码是否正确!", 5, 0);
                    }
                }, error: function (e) {
                }
            });
        }

        document.onkeydown = function (event) {
            var e = event || window.event || arguments.callee.caller.arguments[0];
            if (e && e.keyCode == 13) {
                Login();
            }
        };
    </script>
</head>
<body class="signin">
    <div class="slideshow">
        <div class="slideshow-image" style="background-image: url('img/1.jpg')"></div>
        <div class="slideshow-image" style="background-image: url('img/2.jpg')"></div>
        <div class="slideshow-image" style="background-image: url('img/3.jpg')"></div>
        <div class="slideshow-image" style="background-image: url('img/4.jpg')"></div>
    </div>
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">
                    <div class="logopanel m-b">
                        <h1>[ @RTW.Web.Comm.GlobalParams.GetNodes("Title") ]</h1>
                    </div>
                    <div class="m-b"></div>
                    <h4>欢迎使用 <strong>@RTW.Web.Comm.GlobalParams.GetNodes("Title")</strong></h4>
                </div>
            </div>
            <div class="col-sm-5">
                <form runat="server">
                    <p>登录到 @RTW.Web.Comm.GlobalParams.GetNodes("Title")</p>
                    @*<select name="ddlDepartment" id="ddlDepartment" class="form-control" Style="color: #000;"></select>*@

                    @Html.DropDownList("ddlDepartment", ViewBag.database as IEnumerable<SelectListItem>, new { @class = "btn btn-success dropdown-toggle form-control", @Style = "color: #000;" })
                    <input id="txtUserAccount" type="text" class="form-control uname" placeholder="用户名" autocomplete="off" value="admin"/>
                    <input id="txtUserPwd" type="password" class="form-control pword m-b" placeholder="密码" autocomplete="off" />
                    <button type="button" class="btn btn-success btn-block" onclick="Login()">登录</button>
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
                &copy; 2018 All Rights Reserved. RightWay
            </div>
        </div>
    </div>
</body>
</html>
